#!/usr/bin/evn python
# -*- coding: UTF-8 -*-
# @File: edit_member_page.py
# @Author: fy
# @date: 2021/9/13 16:33
# 编辑成员页面
from pages.base_page import BasePage
from appium.webdriver.common.mobileby import MobileBy


class EditMemberPage(BasePage):
    _delete_member_btn_locator = (MobileBy.XPATH, '//*[@text="删除成员"]')
    _delete_member_ok_btn_locator = (MobileBy.XPATH, '//*[@text="确定"]')

    def delete_member(self):
        from pages.manage_contact_page import ManageContactsPage
        self.scroll_find_element(self._delete_member_btn_locator).click()
        # self.find_and_click(self._delete_member_btn_locator)
        self.find_and_click(self._delete_member_ok_btn_locator)
        return ManageContactsPage(self.driver)
